#           Copyright Daniel Goertzen 2007.
#  Distributed under the Boost Software License, Version 1.0.
#     (See accompanying file LICENSE_1_0.txt or copy at
#           http://www.boost.org/LICENSE_1_0.txt)

# Unfortunately libei and it's headers aren't usually installed into
# the usual places, so point this to your erl_interface installation
ERL_INTERFACE_PATH=/usr/lib64/erlang/lib/erl_interface-3.5.5/


# %:%.in
eipp.h:eipp.h.rubygen
	(echo -e 'puts <<HEREDOC'; cat $<; echo HEREDOC) | ruby > $@


# unit tests for eipp; requires cppunit
test_eipp: test_eipp.cpp et.hpp
	g++ -g -o $@ $@.cpp  -lcppunit -L $(ERL_INTERFACE_PATH)/lib  -I$(ERL_INTERFACE_PATH)/include

# Example program using eipp as a port program
port_test: port_test.cpp eipp.h eipp_packet.h
	g++ -g -o $@ $@.cpp  -lei -L $(ERL_INTERFACE_PATH)/lib -I$(ERL_INTERFACE_PATH)/include
